//
//  ChatViewController.m
//  PeitaMerchants
//
//  Created by apple on 17/5/12.
//  Copyright © 2017年 Facebook. All rights reserved.
//

#import "ChatViewController.h"
#import "AppDelegate.h"

@interface ChatViewController ()

@end

@implementation ChatViewController

- (void)viewWillAppear:(BOOL)animated {
  
  [super viewWillAppear:animated];
//  [self.navigationController setNavigationBarHidden:NO];
}

- (void)viewWillDisappear:(BOOL)animated {
  
//  AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate];
//  [app.nav setNavigationBarHidden:YES animated:animated];
  [super viewDidDisappear:animated];
  
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
  
//  self.navigationController.navigationBar.backIndicatorImage = [UIImage imageNamed:@"nav"];
  
  self.view.backgroundColor = [UIColor whiteColor];
  // 正在输入
  [RCIM sharedRCIM].enableTypingStatus = YES;
  // 消息撤回
  [RCIM sharedRCIM].enableMessageRecall = YES;
  
  // @别人
  //    [RCIM sharedRCIM].enableMessageMentioned = YES;
  
  self.navigationItem.title = self.name;
  self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"left_ios"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(backClicked)];
  
  self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"more"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(openDetail)];
}

- (void)backClicked {
  
  [self.navigationController popViewControllerAnimated:YES];
  
}

- (void)openDetail {
  
  
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
